Nexus 5000系列交换机ERSPAN配置示例

您所在的位置:网站首页 cisco n5k Nexus 5000系列交换机ERSPAN配置示例

Nexus 5000系列交换机ERSPAN配置示例

2024-06-24 17:16| 来源: 网络整理| 查看: 265

目录 简介 先决条件 要求 使用的组件 规则 背景信息 配置 网络图 配置 验证 故障排除 相关信息 简介

本文档介绍如何在Nexus 5000系列交换机上配置封装的远程交换端口分析器(ERSPAN)会话,该交换机通过IP网络传输镜像流量,从而在您的网络中提供远程监控。

先决条件 要求

尝试进行此配置之前,请确保满足以下要求:

具有 Nexus 5000 系列交换机的配置基础知识

具有 Nexus 7000 系列交换机的配置基础知识

具备ERSPAN的基本知识

使用的组件

本文档中的信息基于以下软件和硬件版本:

Nexus 5000 交换机:Cisco NX-OS软件5.1(3)N1(1)版或更高版本上的Cisco Nexus 5010系列交换机

Nexus 7000 交换机:Cisco NX-OS软件版本5.1(3)或更高版本上的Cisco Nexus 7018系列交换机

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档约定的更多信息,请参考 Cisco 技术提示约定。

背景信息

ERSPAN支持远程监控网络中的多台交换机。

Cisco Nexus 5000系列交换机仅支持ERSPAN源会话。Nexus 5000交换机不支持目标会话。因此,在本文档中,Nexus 7000交换机用作ERSPAN目标会话,以监控来自Nexus 5000交换机的镜像流量。

ERSPAN包括ERSPAN源会话、可路由的ERSPAN通用路由封装(GRE)封装流量和ERSPAN目标会话。

ERSPAN将镜像流量从不同交换机的源端口传输到网络分析器连接的目的端口。流量在源交换机上封装,并传输到目的交换机,在目的交换机上解封数据包,然后发送到目的端口。

您可以在不同的交换机上单独配置ERSPAN源会话和目标会话。

ERSPAN源

可监控流量的接口称为ERSPAN源。

您可以监控源端口的所有数据包,这些数据包接收(入口)、传输(出口)或双向(两者)。

ERSPAN源包括源端口、源VLAN或源VSAN。当VLAN指定为ERSPAN源时,VLAN中所有支持的接口都是ERSPAN源。

ERSPAN目标

目的端口从ERSPAN源接收复制的流量。

目的端口是连接到设备(如SwitchProbe设备或其他远程监控(RMON)探测)或安全设备的端口,可以从单个或多个源端口接收和分析复制的数据包。

目标端口不参与任何生成树实例或任何第3层协议。

配置

本部分提供有关如何配置本文档所述功能的信息。

注意:使用命令查找工具(仅限注册客户)可获取有关本节中使用的命令的详细信息。

网络图

本文档使用以下网络设置:

配置

本文档使用以下配置:

Nexus 5000 交换机

Nexus 7000 交换机

Nexus 5000 交换机 Nexus 5000#configure terminal !--- Configures an ERSPAN source session Nexus 5000(config)#monitor session 3 type erspan-source !--- Configure the sources and traffic direction Nexus 5000(config-erspan-src)#source interface Ethernet1/10 both !--- Configure the destination IP address in the ERSPAN session Nexus 5000(config-erspan-src)#destination ip 10.23.21.8 !--- Configure the ERSPAN ID Nexus 5000(config-erspan-src)#erspan-id 903 !--- Configure the VRF Nexus 5000(config-erspan-src)#vrf default !--- Enable the ERSPAN source session (by default the session is in shutdown state) Nexus 5000(config-erspan-src)#no shut Nexus 5000(config-erspan-src)#exit !--- Configure the ERSPAN global origin IP address Nexus 5000(config)#monitor erspan origin ip-address 10.254.254.30 global !--- Configure the IP address for loopback interface, which is used as source of the ERSPAN traffic Nexus 5000(config)#interface loopback1 Nexus 5000(config-if)#ip address 10.254.254.30/32 Nexus 5000(config-if)#exit Nexus 5000(config)#interface Ethernet1/1 Nexus 5000(config-if)#switchport Nexus 5000(config-if)#switchport mode trunk Nexus 5000(config-if)#no shutdown Nexus 5000(config)#feature interface-vlan Nexus 5000(config)#interface Vlan 12 Nexus 5000(config-if)#ip address 10.23.21.7/29 Nexus 5000(config-if)#no ip redirects Nexus 5000(config-if)#no shutdown Nexus 5000(config-if)#exit !--- Save the configurations in the device. switch(config)#copy running-config startup-config Switch(config)#exit

Nexus 7000 交换机 Nexus 7000#configure terminal !--- Configures an ERSPAN destination session Nexus 7000(config)#monitor session 4 type erspan-destination !--- Configures the source IP address Nexus 7000(config-erspan-src)#source ip 10.23.21.8 !--- Configures a destination for copied source packets Nexus 7000(config-erspan-src)#destination interface Ethernet1/24 !--- Configure the ERSPAN ID Nexus 7000(config-erspan-src)#erspan-id 903 !--- Configure the VRF Nexus 7000(config-erspan-src)#vrf default !--- Enable the ERSPAN destination session (by default the session is in shutdown state) Nexus 7000(config-erspan-src)#no shutdown Nexus 7000(config-erspan-src)#exit Nexus 7000(config)#interface Ethernet1/24 Nexus 7000(config-if)#switchport monitor Nexus 7000(config-if)#exit Nexus 7000(config)#feature interface-vlan Nexus 7000(config)#interface Vlan 12 Nexus 7000(config-if)#ip address 10.23.21.8/29 Nexus 7000(config-if)#no ip redirects Nexus 7000(config-if)#no shutdown Nexus 7000(config-if)#exit Nexus 7000(config)#interface Ethernet1/1 Nexus 7000(config-if)#switchport Nexus 7000(config-if)#switchport mode trunk Nexus 7000(config-if)#no shutdown Nexus 7000(config-if)#exit !--- Save the configurations in the device. Nexus 7000(config)#copy running-config startup-config Nexus 7000(config)#exit

验证

使用本部分可确认配置能否正常运行。

命令输出解释程序(仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

Nexus 5000 系列交换机:

使用show monitor命令显示ERSPAN会话的状态。

Nexus 5000# show monitor Session State Reason Description ------- ----------- ---------------------- -------------------------------- 3 up The session is up

使用show monitor session [session session_number]命令可显示ERSPAN会话配置。

Nexus 5000# show monitor session 3 session 3 --------------- type : erspan-source state : up erspan-id : 903 vrf-name : default destination-ip : 10.23.21.8 ip-ttl : 255 ip-dscp : 0 origin-ip : 10.254.254.30 (global) source intf : rx : Eth1/10 tx : Eth1/10 both : Eth1/10 source VLANs : rx :

使用show running-config monitor命令可显示运行的ERSPAN配置。

Nexus 5000# show running-config monitor !Command: show running-config monitor !Time: Thu Apr 19 09:32:27 2012 version 5.1(3)N1(1) monitor session 3 type erspan-source erspan-id 903 vrf default destination ip 10.23.21.8 source interface Ethernet1/10 both no shut monitor erspan origin ip-address 10.254.254.30 global

Nexus 7000 系列交换机:

使用show monitor命令显示ERSPAN会话的状态。

Nexus 7000# show monitor Session State Reason Description ------- ----------- ---------------------- -------------------------------- 4 up The session is up

使用show monitor session [session session_number]命令可显示ERSPAN会话配置。

Nexus 7000# show monitor session 4 session 4 --------------- type : erspan-destination state : up erspan-id : 903 vrf-name : default source-ip : 10.23.21.8 destination ports : Eth1/24 Legend: f = forwarding enabled, l = learning enabled

使用show running-config monitor命令可显示运行的ERSPAN配置。

Nexus 7000# show running-config monitor !Command: show running-config monitor !Time: Thu Apr 19 11:13:28 2012 version 5.1(3) monitor session 4 type erspan-destination erspan-id 903 vrf default source ip 10.23.21.8 destination interface Ethernet1/24 no shut 故障排除

目前没有针对此配置的故障排除信息。

相关信息 Cisco Nexus 5000 系列交换机支持 Cisco Nexus 7000 系列交换机支持 交换机产品支持 LAN 交换技术支持 技术支持和文档 - Cisco Systems



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3